package cn.edu.suda.catalina.health;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;


/**
 * A simple {@link Fragment} subclass.
 * Use the {@link GameFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class GameFragment extends Fragment {

    public GameFragment() {
    }

    public static GameFragment newInstance() {
        return new GameFragment();
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_game, container, false);

        view.findViewById(R.id.game_one).setOnClickListener(mListener);
        view.findViewById(R.id.game_two).setOnClickListener(mListener);
        view.findViewById(R.id.game_three).setOnClickListener(mListener);
        view.findViewById(R.id.game_four).setOnClickListener(mListener);
        view.findViewById(R.id.game_five).setOnClickListener(mListener);
        view.findViewById(R.id.game_six).setOnClickListener(mListener);
        view.findViewById(R.id.game_seven).setOnClickListener(mListener);
        view.findViewById(R.id.game_eight).setOnClickListener(mListener);
        view.findViewById(R.id.game_nine).setOnClickListener(mListener);

        return view;
    }

    private View.OnClickListener mListener = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            switch (v.getId()) {
                case R.id.game_one:
                    break;
                case R.id.game_two:
                    break;
                case R.id.game_three:
                    break;
                case R.id.game_four:
                    break;
                case R.id.game_five:
                    break;
                case R.id.game_six:
                    break;
                case R.id.game_seven:
                    break;
                case R.id.game_eight:
                    break;
                case R.id.game_nine:
                    break;
            }
        }
    };

}
